package com.bcnapps.DemoGame;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.PowerManager;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.WindowManager;

public class GameTwoLayout extends Activity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.gametwo);
		GV.Instancies.gametwolayout = this;
		GV.Instancies.gametwo = (GameTwo)findViewById(R.id.gametwoview);
		PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
		GV.Screen.wl = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK, "GameOnLock");
	}
	
	@Override
	protected void onPause() {
		GV.Instancies.gametwo.stopthread();
		GV.Screen.wl.release();
		super.onPause();
	}

	@Override
	protected void onResume() {
		GV.Screen.metrics = new DisplayMetrics();
		getWindowManager().getDefaultDisplay().getMetrics(GV.Screen.metrics);
		GV.Instancies.gametwo.startthread();
		GV.Screen.wl.acquire();
		super.onPostResume();
	}

}
